<div class="ui-widget-content" style="padding: 10px; width: 800px; margin: auto; background: none; border: none;">
	{if isset($data.message)}
		<div id="message" class="ui-state-highlight" style="text-align: center;">
			<span class="ui-icon ui-icon-info" style="float: left; margin: 2px;">&nbsp;</span>
			{$data.message}
		</div>
		<script type="text/javascript">
			$("#message").delay("5000").fadeOut("slow");
		</script>
	{/if}
	<div style="float: left; width: 580px; margin-top: 20px;">
		{include file="`$smarty.const.TEMPLATE_DIR`snippets/tut_home.tpl"}
	</div>
	<div class="ui-widget-content ui-corner-all" style="width: 200px; padding:5px; float: right;"> 
		<h3 class="ui-widget-header" style="margin-top: 0; text-align: center;"> Prihlásenie </h3>
		<div style="padding: 5px; padding-top: 0;">
			{isLoggedIn}
				<form action="home?action=logout" method="POST">
					V systéme ste už prihlásený. <br/><br/>
					<a style="width: 100%;" class="button" href="plan">Pokračovať</a><br/>
					<input style="width: 100%;" class="button" id="logout" type="submit" value="Odhlásiť sa"><br/>
				</form>
			{notLoggedIn}
				<form action="home?action=login" method="POST">
					<label for="username"> Prihlasovacie meno: </label><br/>
					<input class="input-text" id="username" type="text" name="username"/><br/>
					<label for="password"> Heslo: </label><br/>
					<input class="input-text" id="password" type="password" name="password"/><br/>
					{if isset($data.login)}
						<div id="error" class="ui-state-error">
							<span class="ui-icon ui-icon-alert" style="float: left; margin: 2px;">&nbsp;</span>
							<span>
								{$data.login}
							</span>
						</div>
					{/if}
					<input class="button" id="login" type="submit" value="Prihlásenie"><br/>
					<a href="register" style="margin-left: 5px;"> Registrovať </a>
				</form>	
			{/isLoggedIn}
		</div>
	</div>
	<div style="clear: both; height: 0;">&nbsp;</div>
</div>



<script type="text/javascript">
	$(function(){
		$(".button").button();
	})
</script>
